#ifndef __HighSpeed_H
#define __HighSpeed_H

namespace highspeed
{
#define DEFAULT_OUTPUT_IMAGE "/tmp/photo.jpg"
#define MAX_WIDTH  3264
#define MAX_HEIGHT 2448
#define DEFAULT_WIDTH 2592
#define DEFAULT_HEIGHT 1944

enum ColorStyle {
    TrueColor = 0,
    GrayLevel,
    BlackAndWhite
};

enum RotationType {
    NoRotate = 0,
    OneFourth,
    TwoFourth,
    ThreeFourths
};

const char *statuses[] = {
    [0] = "online",
    [1] = "offline",
    [2] = "busy",
    [3] = "hardware error",
    [4] = "unknown error"
};

int init();

int getStatus();

int close();

char *takePicture(const char *file = DEFAULT_OUTPUT_IMAGE, int width = DEFAULT_WIDTH, int height = DEFAULT_HEIGHT);

int setPixel(int horizontal, int vertical);

int setColorStyle(ColorStyle style);
int setColorStyle(int style);

/*
 * 0: no rotate
 * 1: rotate 1/4 turn (90 degrees)
 * 2: rotate 1/2 turn (180 degrees)
 * 3: rotate 3/4 turn (270 degrees)
 */
int rotate(RotationType rotate);
int rotate(int rotate);

/*
 * (-1, -5) zoom out
 * (1, 5) zoom in
 */
int setZoomScale(int scale);

int setDPI(int dpi);

} // namespace highspeed

#endif //__HighSpeed_H
